<!DOCTYPE html>
<html lang="en">
        <head>
                <meta charset="UTF-8">
                <title>Title</title>
        </head>
        <body>
                <div th:replace="common/top"></div>

                <div id="BackLink">
<!--                        <a th:href="@{viewCategory(categoryId=${product.categoryId})}"  th:text="'Rerurn to '+${product.categoryId}">Return to ***</a>-->

<!--                        <a th:href="@{viewProduct(productId=${product.productId})}"  th:text="${producproductId}" >productId</a>-->
                </div>

                <div id="Catalog">

                        <h2 th:text="${productId}">${sessionScope.product.name}</h2>

                        <table>
                                <tr>
                                        <th>Item ID</th>
                                        <th>Product ID</th>
                                        <th>Description</th>
                                        <th>List Price</th>
                                        <th>是否上架</th>
                                        <th>modify</th>
                                        <th>delete</th>
                                </tr>

                                <tr th:each="item:${itemList}">
                                        <td>
                                                <a th:href="@{/catalogM/viewItemC(itemId=${item.itemId})}"
                                                   th:text="${item.itemId}">itemId</a>
                                        </td>
                                        <td th:text="${item.productId}">ProductId</td>
                                        <td th:text="${item.attribute1} +${item.attribute2}+${item.attribute3}+${item.attribute4}+${item.attribute5}">
                                        ${item.attribute1} ${item.attribute2} ${item.attribute3}
                                        ${item.attribute4} ${item.attribute5}
                                        </td>
                                        <td th:text="'$'+${item.listPrice}">$100</td>
<!--                                        <td>-->
<!--                                                <a class="Button"  th:href="@{/cart/addItemToCart(workingItemId=${item.itemId})}" >Add to Cart</a>-->
<!--                                        </td>-->

                                        <td th:if="${item.inStore}"><a th:href="@{/catalogM/cancelShip(itemId=${item.itemId},isShipped=0)}">下架</a></td>
                                        <td th:if="${!item.inStore}"><a th:href="@{/catalogM/confirmShip(itemId=${item.itemId},isShipped=1)}">上架</a></td>
                                        <td><a th:href="@{/catalogM/gotoModifyItem(itemId=${item.itemId})}">修改</a></td>
                                        <td><a th:href="@{/catalogM/deleteItem(itemId=${item.itemId})}">删除</a></td>
                                </tr>


                                <!--                                <c:forEach var="item" items="${sessionScope.itemList}">-->
                                <!--                                        <tr>-->
                                <!--                                                <td>-->
                                <!--                                                        <a href="viewItem?itemId=${item.itemId}">${item.itemId}</a>-->
                                <!--                                                </td>-->
                                <!--                                                <td>-->
                                <!--                                                        ${item.product.productId}-->
                                <!--                                                </td>-->
                                <!--                                                <td>-->
                                <!--                                                        ${item.attribute1} ${item.attribute2} ${item.attribute3}-->
                                <!--                                                        ${item.attribute4} ${item.attribute5}-->
                                <!--                                                        ${sessionScope.product.name}-->
                                <!--                                                </td>-->
                                <!--                                                <td>-->
                                <!--                                                        <fmt:formatNumber value="${item.listPrice}"-->
                                <!--                                                                          pattern="$#,##0.00"/>-->
                                <!--                                                </td>-->
                                <!--                                                <td>-->
                                <!--                                                        <a class="Button" href="addItemToCart?workingId=${item.itemId}">Add-->
                                <!--                                                                to Cart</a>-->
                                <!--                                                </td>-->
                                <!--                                        </tr>-->
                                <!--                                </c:forEach>-->
                                <tr>
                                        <td colspan="7" style="text-align: center" > <a href="/catalogM/gotoAddItem" >新增</a> </td>
                                </tr>
                        </table>

                </div>


                <div th:replace="common/bottom"></div>

        </body>
</html>